package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;

public class TicketListBean implements Serializable, IJsonParser{

	/**
	 *  "tickets": [
        {
            "status": 2,
            "pay_begin_time": [
                12,
                12
            ],
            "coupon_type": 1,
            "valid_note": "有效期声明",
            "pay_end_time": [
                12,
                12
            ],
            "valid_begin_time": 1430327111,
            "members_only": true,
            "coupon_id": 1,
            "note": "使用说明",
            "created_time": 1430131505.857201,
            "discount_text": "优惠方式说明",
            "valid_end_time": 1432799447,
            "scope": "适用范围",
            "coupon_num_2": 0,
            "logo": {
                "url": "http://imgs.ykdllmyr.com/coupon_logo/2015/4/27/HsDP8GeFwikk6tzpdw8RcJ.jpeg",
                "width": 690,
                "file_id": 100000939,
                "height": 488
            },
            "coupon_num_1": 100,
            "discount_to": "优惠对象",
            "store": {
                "store_id": 100100268,
                "name": "逗比的门店"
            }
        }
    ]
	 */
	private static final long serialVersionUID = 4302985311220315801L;
	private int next_cursor;
	private int total_number;
	private ArrayList<TicketBean>  tickets;
	private ArrayList<TicketBean>  coupon_list;
	private String desc ;
	private String error ;
	public ArrayList<TicketBean> getCoupon_list() {
		return coupon_list;
	}
	public int getNext_cursor() {
		return next_cursor;
	}
	public int getTotal_number() {
		return total_number;
	}
	public ArrayList<TicketBean> getTickets() {
		return tickets;
	}
	public String getDesc() {
		return desc;
	}
	public String getError() {
		return error;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, TicketListBean.class);
		}
		return null;
	}

}
